More Thoughts About State + State Guidelines
As we finish this first dive into state, I want to share a few more important thoughts, or ideas, about state, as well as some practical guidelines.
So, first of all, there is one important technical detail that you should be aware of, and this might seem obvious but it’s still worth mentioning.
So, what I’m talking about is the fact that each component really has, and manages, its own state. So, even if we render the same component multiple times on one page, each of these component instances will operate independently from all the other ones.
So, in this example, the three counter components all start with a piece of state called “Score,” which is set initially to zero. Then, if one of the buttons is clicked, that increases the score by one for each click, but only in that component. The state in all the other components stays the same.